import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mtf/app/modules/edit_nick_name_module/edit_nick_name_controller.dart';
import 'package:mtf/app/theme/app_colors.dart';
import 'package:mtf/app/widget/AppBarLeftTitle.dart';
/**
 * GetX Template Generator - fb.com/htngu.99
 * */

class editNickNamePage extends GetView<editNickNameController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBarLeftTitle(title: "改昵称"),
      body: Obx(() {
        return Container(
          child: Column(children: [
            Container(
              width: double.infinity,
              color: Colors.white,
              child: TextField(
                decoration: InputDecoration(
                  contentPadding:
                  const EdgeInsets.symmetric(vertical: 14, horizontal: 16),
                  hintText: "请输入您的昵称",
                  hintStyle: TextStyle(fontSize: 14, color: c_999999),
                  border: InputBorder.none,
                ),
                style: TextStyle(color: c_333333, fontSize: 14),
                controller: controller.nickNameController,
              ),
            ),
            Divider(height: 1,),
            Padding(
              padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
              child: Text("4-20个字符，可由中英文、数字组成"),
            ),
            Container(
              margin: const EdgeInsets.only(top: 30, left: 10, right: 10),
              width: double.maxFinite,
              height: 48,
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(24),
                color: c_f12f38,
              ),
              child: TextButton(
                  child: Text("保存",
                      style: TextStyle(
                          color: Colors.white,
                          fontSize: 16,
                          fontWeight: FontWeight.bold)),
                  onPressed: () {
                    controller.clickEditName();
                  }),
            )
          ],),
        );
      }),
    );
  }
}
